let p = document.getElementById("picture");
let name=1;
function changePicture() {
    p.src = `img/${name}.jpg`;
    name == 6?name = 1: name++;
}
setInterval(changePicture,1000);